package com.reverie.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("sys_mng")
public class User {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private String username;
    private String password;
    private String nickname;
    private String realname;
    private String rdmSalt;

    @TableField(value = "crte_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @TableField(value = "crte_mng_id")
    private Integer createUserId;
    private String orgId;
    private String phone;
    @TableField(value = "status")
    private Integer state;

    @TableField(exist = false)
    private String oldPwd;
    @TableField(exist = false)
    private String newPwd;
    @TableField(exist = false)
    private String token;
    @TableField(exist = false)
    private List<Menu> rightMenus;
    @TableField(exist = false)
    private String verifyCode;
    @TableField(exist = false)
    private String verifyTk;

    private Integer roleId;
}
